package service.contract;

import java.util.List;

import exception.Exceptions;

import model.TContract;
import model.company.Companybasic;
import model.company.Companycontact;
import model.company.Companypledger;
import model.company.Companytopmanager;
import model.contract.Contractensure;
import model.contract.Contractmortgage;
import model.contract.Contractpledge;
import model.contract.Loangrant;
import model.credit.Applycustomrelation;
import model.credit.Creditapplyenterprise;
import model.credit.Creditapplypersonal;
import model.dropdown.DCommon;
import model.personal.Personalbasic;

public interface ContractService {
	
	//对credit表的操作
	public abstract List<?> get_credit_list(String custom,String credit,String customcode);
	public abstract Creditapplyenterprise get_creditcompany(int creditid)throws Exceptions;
	public abstract Creditapplypersonal get_creditpersonal(int creditid)throws Exceptions;
	public abstract void save_in_creditPersonal(Creditapplypersonal creditpersonal);
	public abstract void save_in_creditCompany(Creditapplyenterprise creditcompany);
	
	//对客户基本信息的操作
	public abstract Companybasic get_companybasic(int clientid)throws Exceptions;
	public abstract Companybasic get_companybasic(String name,String value)throws Exceptions;
	public abstract Personalbasic get_personalbasic(int clientid)throws Exceptions;
	public abstract Personalbasic get_personalbasic(String name,String value)throws Exceptions;
	public abstract Companycontact get_companycontact(int clientid)throws Exceptions;
	
	//对合同表的操作
	public abstract int save_in_contract(TContract contract);
	public abstract void save_in_contractensure(Contractensure contractensure);
	public abstract void save_in_contractmortgage(Contractmortgage contractmortgage);
	public abstract void save_in_contractpledge(Contractpledge contractpledge);
	
	//对applycustomrelation的操作
	public abstract List<?> show_ensureRelation(int creditid);
	public abstract List<?> showRelation(int creditid,Integer type);
	public abstract Integer get_countrelation(int creditid,Integer type);
	public abstract Applycustomrelation getapplyrelation(String name,Integer value)throws Exceptions;
	public abstract void save_in_applycustomrelation(Applycustomrelation applyrelation);
	
	//对customthing的操作
	public abstract Companypledger get_customthings(int thingsid)throws Exceptions;
	public abstract Companypledger get_customthings(String name,String value)throws Exceptions;
	
	//对loangrant的操作
	public abstract void save_in_loangrant(Loangrant loangrant);
	
	//对Companytopmanager的操作
	public abstract Companytopmanager get_topmanager(String str)throws Exceptions;
	
	//对DIdtype操作
	public abstract List<DCommon> getIdtypeList();
}
